import React, { Component } from 'react';
import autoBind from 'react-autobind';
import { connect } from 'dva';

// widget 
import HeadNav from '../components/Common/HeadNav'
import AddAddressBody from '../components/Address/AddAddressBody'

class AddAddressPage extends Component {
	constructor(props) {
        super(props)
        autoBind(this)
    }
    
    componentDidMount() {
    	const { dispatch, meyley } = this.props
    	dispatch({
    		type: 'address/fetchProvince'
    	})
    }

	render() {
		return (
		  	<div>
                <HeadNav title="新增收货地址"/>
    			<AddAddressBody {...this.props} />
		    </div>
		);
	}
}

AddAddressPage.propTypes = {
};

export default connect(({ meyley, address }) => ({
	meyley,
    address
}))(AddAddressPage);